---
title: Migrate From Luckysheet to Univer
---

Compared with Luckysheet, our newly designed Univer has made great improvements in terms of architecture, data structure and API, so Luckysheet can no longer be migrated 1:1 to Univer.

However, basic data types or APIs can be found in Univer. In view of this, if you still want to migrate Luckysheet data to Univer, you can do some targeted adaptation work according to your needs.

Here is a migration guide for everyone.

## Analysis

### Configuration

The core work of the conversion is to adapt the workbook configuration, worksheet configuration and cell information. You can refer to the Univer interface and Luckysheet data structure.

| | Univer | Luckysheet |
|-------|----------------|------------|
| Workbook configuration | [IWorkbookData](/guides/sheets/model/workbook-data#iworkbookdata) | [Overall Configuration](https://dream-num.github.io/LuckysheetDocs/guide/config.html) |
| Worksheet configuration | [IWorksheetData](/guides/sheets/model/worksheet-data#iworksheetdata) | [Sheet Configuration](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html) |
| Cell | [ICellData](/guides/sheets/model/cell-data) | [Cell Attributes](https://dream-num.github.io/LuckysheetDocs/guide/cell.html) |

### Plugin

Luckysheet is initialized through a JSON configuration, while Univer is split, the enhanced functions are implemented with plugins, so some functions need to be dispersed into plugin configurations, such as

| | Univer | Luckysheet |
|-------|----------------|------------|
| Number Format | [numfmt](/guides/sheets/features/core/numfmt), Configure via [Cell Style](/guides/sheets/model/cell-data#number-format) | [Cell format: cell.ct](https://dream-num.github.io/LuckysheetDocs/guide/cell.html#cell-format) |
| Floating Images | [floating images](/guides/sheets/features/floating-images) | [image](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html#image) |
| Find & Replace | [find replace](/guides/sheets/features/find-replace) | - |
| Filter | [filter](/guides/sheets/features/filter) | [filter](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html#filter) |
| Sort | [sort](/guides/sheets/features/sort) | [filter](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html#filter) (Included in filter) |
| Pivot Table | [pivot table](/guides/sheets/features/pivot-table) | [pivotTable](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html#pivottable) |
| Data Validation | [data validation](/guides/sheets/features/data-validation) | [dataverification](https://dream-num.github.io/LuckysheetDocs/zh/guide/sheet.html#dataverification) |
| Conditional Formatting | [conditional formatting](/guides/sheets/features/conditional-formatting)  | [luckysheet_conditionformat_save](https://dream-num.github.io/LuckysheetDocs/guide/sheet.html#luckysheet-conditionformat-save) |
| Comment / Annotation | [thread comment](/guides/sheets/features/thread-comment)  | [Cell Comments: cell.ps](https://dream-num.github.io/LuckysheetDocs/zh/guide/cell.html#%E5%9F%BA%E6%9C%AC%E5%8D%95%E5%85%83%E6%A0%BC) |
| Print | [print](/guides/sheets/features/print)  | [Print plugin](https://github.com/dream-num/Luckysheet/wiki/Plugin:-Print) |
| Import & Export | [import export](/guides/sheets/features/import-export) | [Luckyexcel import](https://github.com/dream-num/Luckyexcel) & [export](https://github.com/dream-num/Luckysheet/wiki/Plugin:-Export-XLSX), Or [community solutions](https://dream-num.github.io/LuckysheetDocs/guide/FAQ.html#how-to-import-and-export-excel) |
| Collaborative Editing | [collaboration](/guides/sheets/features/collaboration) | [LuckysheetServer](https://github.com/dream-num/LuckysheetServer) |

### API

For the API part, Luckysheet API is uniformly mounted on `window.luckysheet`, there are two ways to use Univer API

- Call the encapsulated [Facade API](/guides/sheets/getting-started/facade)
- Use Univer's dependency injection system to inject the plugin's service capabilities into the current Class. Refer to our [Plugin Tutorial](/guides/sheets/tutorials/csv-import-plugin/) to easily access the Univer dependency injection system

## Summary

For some commonly used basic data, you can refer to Demo and customize it according to project requirements. Some source code is in [migrate-luckysheet](https://github.com/awesome-univer/migrate-luckysheet/tree/main/src) repository.

If Univer's existing functions do not meet your needs, you can also develop your own plugin for adaptation.

## Demo

<PlaygroundFrame lang="en-US" slug="sheets/migrate-from-luckysheet" clickToShow />

## FAQ

### How to migrate the `transformExcelTolucky` method of Luckyexcel?

The `transformExcelTolucky` method is provided in Luckyexcel, which can convert Excel files into JSON data. In the corresponding Univer, the [`importXLSXToSnapshotAsync`](/en-US/guides/sheets/features/import-export#import-xlsx-and-get-workbook-data) method of Facade API can be used to achieve this.

If you need to convert an online Excel file, Luckyexcel provides the `transformExcelToLuckyByUrl` method. In Univer, you can directly call the `importXLSXToSnapshotAsync` method to achieve this.
